import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

let routes = [
  {
    path: "/",
    name: "lottery",
    component: resolve => require(["@/page/activity/lottery.vue"], resolve),
    redirect: '/activity/lottery',
  },
  {
    path: '/activity',
    name: 'activity',
    component: resolve => require(['@/page/activity/activity.vue'], resolve),
    meta: {
      title: '酒酒酒活动'
    }
  },
  {
    path: '/activity/lottery',
    name: 'lottery',
    component: resolve => require(['@/page/activity/lottery.vue'], resolve),
    meta: {
      title: '抽奖活动'
    }
  },
  {
    path: '/error',
    name: 'error',
    component: resolve => require(['@/page/error/error.vue'], resolve),
    meta: {
      title: '加载错误'
    }
  },
  {
    path: '*', // 此处需特别注意置于最底部
    redirect: '/error'
  }
]
export default routes
